import layout from '@/views/layouts/index'
import layoutSub from '@/views/layouts/sub'
import home from '@/views/home/index'
/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/',
    component: layout,
    redirect: '/home',
    meta: {
      title: '长航经营驾驶舱',
      keepAlive: false
    },
    children: [
      {
        path: '/home',
        name: 'Home',
        component: home,
        meta: { title: '长航经营驾驶舱', keepAlive: true }
      },
      {
        path: '/analysis',
        name: 'Analysis',
        component: () => import('@/views/analysis/index'),
        meta: { title: '绩效考核', keepAlive: false }
      },
      {
        path: '/custom',
        name: 'Custom',
        component: () => import('@/views/custom/index'),
        meta: { title: '定制报表', keepAlive: true }
      },
      {
        path: '/about',
        name: 'About',
        component: () => import('@/views/home/about'),
        meta: { title: '关于我', keepAlive: false }
      }
    ]
  },
  {
    path: '/detail',
    component: layoutSub,
    redirect: '/detail',
    meta: {
      title: '下钻',
      keepAlive: false
    },
    children: [
      {
        path: '/detail',
        name: 'detail',
        component: () => import('@/views/detail/indexNew'),
        meta: { title: '下钻', keepAlive: false }
      },
      {
        path: '/traceDetail',
        name: 'TraceDetail',
        component: () => import('@/views/trace/traceDetail'),
        meta: { title: '追踪详情', keepAlive: false }
      },
      {
        path: '/performanceRank',
        name: 'performanceRank',
        component: () => import('@/views/analysis/performanceScore'),
        meta: { title: '长航经营驾驶舱', keepAlive: false }
      },
      {
        path: '/performanceDetails',
        name: 'performanceDetails',
        component: () => import('@/views/analysis/performanceDetails'),
        meta: { title: '长航经营驾驶舱', keepAlive: false }
      }
      // ,
      // {
      //   path: '/sub/ddnav',
      //   name: 'ddnav',
      //   component: () => import('@/views/analysis/ddnav'),
      //   meta: { title: '钉钉测试', keepAlive: true }
      // }
    ]
  }
]
